﻿namespace System {
	static class Time {
		static method get() {
			return @system_time_get;
		}

		static method format(pattern, time=null) {
			argmatch(STRING, NULL) {
				return @system_time_format(pattern, @system_time_get);
			} else argmatch(STRING, INT) {
				return @system_time_format(pattern, time);
			}

			throw new InvalidFormatException();
		}
	}
}
